<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'accountDebtDebt.label', default: 'accountDebtDebt')}" />
        <title>修改企业负债信息</title>
    </head>
    <body class="fixed-navbar fixed-sidebar">
        <div class="small-header transition animated fadeIn">
            <div class="hpanel">
                <div class="panel-body">
                    <div id="hbreadcrumb" class="pull-right">
                        <ol class="hbreadcrumb breadcrumb">
                            <li>贷款管理系统</li>
                            <li class="active">
                                <span>修改企业负债信息</span>
                            </li>
                        </ol>
                    </div>
                    <h2 class="font-light m-b-xs">
                        修改企业负债信息
                    </h2>
                </div>
            </div>
        </div>
        <div class="content animate-panel">
            <div class="row">
                <div class="hpanel hyellow">
                    <div class="panel-heading">
                        修改企业负债信息
                    </div>
                    <div class="panel-body">
                        <g:if test="${flash.message}">
                        <div class="message" role="status">${flash.message}</div>
                        </g:if>
                        <g:hasErrors bean="${this.accountDebt}">
                        <ul class="errors" role="alert">
                            <g:eachError bean="${this.accountDebt}" var="error" >
                            <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                            </g:eachError>
                        </ul>
                        </g:hasErrors>
                        <g:form resource="${this.accountDebt}" method="PUT" class="form-horizontal">

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">

                                <label class="col-md-2 control-label">企业名称</label>
                                <g:textField name="targetUri" value="${this.targetUri}" class="hidden" />
                                <div class="col-md-3"><g:select name="account.id" value="${this.accountDebt?.account?.id}" from="${com.next.Account.list()}" optionKey="id" optionValue="name" disabled class="form-control" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">客户名称</label>
                                <div class="col-md-3"><g:select name="debtClient.id" value="${this.accountDebt?.debtClient?.id}" from="${com.next.Account.list()}" optionKey="id" class="form-control" /></div>
                                <label class="col-md-2 control-label">账龄</label>
                                <div class="col-md-3"><g:textField name="age" value="${this.accountDebt.age}" class="form-control" /></div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">登记机构</label>
                                <div class="col-md-3"><g:textField name="registerAccount" value="${this.accountDebt?.registerAccount}" class="form-control" /></div>
                                <label class="col-md-2 control-label">金额</label>
                                <div class="col-md-3"><g:textField name="amount" value="${this.accountDebt?.amount}" class="form-control" /></div>

                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">登记人</label>
                                <div class="col-md-3"><g:textField name="registerUser" value="${this.accountDebt?.registerUser}" class="form-control" /></div>
                                <label class="col-md-2 control-label">登记日期</label>
                                <div class="col-md-3 datePicker">
                                    <g:datePicker name="registerDate"  value="${new Date()}" precision="day"/>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                              <label class="col-md-2 control-label">会计科目</label>
                              <div class="col-md-3"><g:select name="subject.id" value="${this.accountDebt?.subject?.id}" from="${com.next.Subject.list()}" optionKey="id" class="form-control" /></div>
                                <label class="col-md-2 control-label">币种</label>
                                <div class="col-md-3"><g:select name="currencyType.id" value="${this.accountDebt?.currencyType?.id}" from="${com.next.CurrencyType.list()}" optionKey="id" optionValue="name" class="form-control" /></div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <g:hiddenField name="account.id" value="${this?.accountDebt?.account?.id}"/>
                            <g:hiddenField name="targetUri" value="${targetUri}"/>
                            <div class="form-group">
                                <div class="col-md-3 col-md-offset-3">
                                    <g:submitButton class="btn btn-info" name="create" value="保存" />
                                </div>
                            </div>
                        </g:form>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>
